Tutorial 3.

This tutorial demonstrates the simultaneous fitting feature.  Start up MacCurveFit and open the file “Simultaneous Data” (in the examples folder).  

 

The window contains data for a somewhat contrived chemical reaction where a reactant is converted to a product in a unimolecular process thus exhibiting first order kinetics.  My apologies to those who are not interested chemistry.  The first column contains times since the reaction started, the second and third columns hold the concentrations of the reactant and product respectively.  The reference to first order kinetics means that the reaction behaves as described below:

-d[reactant]/dt = d[product]/dt = k[reactant]

Hence the reactant and product concentrations can be calculated as:

[reactant] = a*exp(-b*x)
[product] = a*(1-exp(-b*x)

where a is the initial concentration of the reactant, b is the rate constant (k) and x is the time.

Open the file Simultaneous Plot and a window will appear showing reactant and product concentrations against time.  

 

The curve fit window will show the above equations describing the concentrations versus time.  The solution to the fitting exercise should have the same value of coefficient 'a' in both equations and the same value of coefficient 'b'.  This constraint can be applied by selecting Simultaneous Fit from the Fit menu.  The simultaneous fitting mode uses a common set of coefficients for all equations and the total sum of squared errors is calculated as ∑SSE in the fit window.  Clicking on the Fit button will perform the simultaneous fitting operation giving the following results.

 

 

The simultaneous mode can then be switched off by  unchecking the Simultaneous Fit item in the Fit menu.  The fit window then displays the individual SSE and R2 values for each data set.  In this case the individual fits have the following values.

[reactant] fit:

SSE = 0.00323
R2 = 0.99122

[product] fit:

SSE = 0.00380
R2 = 0.98736

Finally I'll comment on the errors for the fit.  The errors shown immediately after the fit, while the simultaneous mode is on, are the proper errors for that type of fit.  When the simultaneous mode is switched off the errors will be cleared, recalculating the errors will give slightly different values.  This is because the recalculated errors are for the individual fit and the coefficients do not correspond to the best fit for that single data set.  The errors quoted should be the errors determined by the simultaneous fitting operation.

Well that covers the general usage of MacCurveFit.  You can now start to do some curve fitting of the own, which I’m sure you’ll find far more interesting.